const { STATUS_CODE } = require('../constants');
const fs = require('fs');

function registerExtensions() {
  const paths = fs.readdirSync(__dirname);
  paths.forEach(path => {
    if (path !== 'index.js') {
      const extension = require(`${__dirname}/${path}`);
      this.extension = extension;
      this.extension();
    }
  });
}

module.exports = registerExtensions;
